fix(cli): start auto memory in ACP sessions#25626
fix(cli): start auto memory in ACP sessions#25626jasonmatthewsuhari wants to merge 1 commit intogoogle-gemini:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request standardizes the startup behavior of the Auto Memory feature across the CLI. By centralizing the initialization logic into a shared utility, it ensures that both ACP and TUI sessions consistently respect the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new utility function, startAutoMemoryIfEnabled, to centralize the logic for starting the auto-memory service. The change refactors GeminiAgent and AppContainer to use this utility, ensuring consistent behavior across different session initialization paths. Additionally, unit tests have been added to verify that the memory service is conditionally started based on the user's configuration. I have no feedback to provide as there were no review comments to evaluate.
Fixes #25624
Summary
Start Auto Memory during ACP session boot so ACP and TUI sessions behave consistently when
experimental.autoMemoryis enabled.What changed
newSessionandloadSessionboot paths.AppContainerboot path to the same helper to keep the behavior consistent across surfaces.Why
Auto Memory is documented as a session-start background feature, but ACP sessions did not start the memory service even when the setting was enabled. This patch wires ACP boot into the same startup behavior the TUI already had.
Testing
node scripts/generate-git-commit-info.jsC:\Users\Jason\Documents\GitHub\gemini-cli\node_modules\.bin\vitest.cmd run src/acp/acpClient.test.ts --coverage.enabled=falseC:\Users\Jason\Documents\GitHub\gemini-cli\node_modules\.bin\vitest.cmd run src/ui/AppContainer.test.tsx --coverage.enabled=falseC:\Users\Jason\Documents\GitHub\gemini-cli\node_modules\.bin\vitest.cmd run src/ui/commands/memoryCommand.test.ts --coverage.enabled=false